Left Termination of the query pattern t_in_1(g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

t(N) :- ','(ll(N, Xs), ','(select(X, Xs, Xs1), ','(ll(M, Xs1), t(M)))).
t(0).
ll(s(N), .(X, Xs)) :- ll(N, Xs).
ll(0, []).
select(X, .(Y, Xs), .(Y, Ys)) :- select(X, Xs, Ys).
select(X, .(X, Xs), Xs).

Queries:

t(g).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

T_IN(N) → U11(N, ll_in(N, Xs))
T_IN(N) → LL_IN(N, Xs)
LL_IN(s(N), .(X, Xs)) → U51(N, X, Xs, ll_in(N, Xs))
LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
U11(N, ll_out(N, Xs)) → SELECT_IN(X, Xs, Xs1)
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → U61(X, Y, Xs, Ys, select_in(X, Xs, Ys))
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)
U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U21(N, select_out(X, Xs, Xs1)) → LL_IN(M, Xs1)
U31(N, ll_out(M, Xs1)) → U41(N, t_in(M))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)
LL_IN(x1, x2)  =  LL_IN
T_IN(x1)  =  T_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
U41(x1, x2)  =  U41(x2)
U11(x1, x2)  =  U11(x2)
U31(x1, x2)  =  U31(x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U21(x1, x2)  =  U21(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

T_IN(N) → U11(N, ll_in(N, Xs))
T_IN(N) → LL_IN(N, Xs)
LL_IN(s(N), .(X, Xs)) → U51(N, X, Xs, ll_in(N, Xs))
LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
U11(N, ll_out(N, Xs)) → SELECT_IN(X, Xs, Xs1)
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → U61(X, Y, Xs, Ys, select_in(X, Xs, Ys))
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)
U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U21(N, select_out(X, Xs, Xs1)) → LL_IN(M, Xs1)
U31(N, ll_out(M, Xs1)) → U41(N, t_in(M))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)
LL_IN(x1, x2)  =  LL_IN
T_IN(x1)  =  T_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
U41(x1, x2)  =  U41(x2)
U11(x1, x2)  =  U11(x2)
U31(x1, x2)  =  U31(x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U21(x1, x2)  =  U21(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SELECT_IN(.(Xs)) → SELECT_IN(Xs)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)
LL_IN(x1, x2)  =  LL_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN(x1, x2)  =  LL_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

LL_INLL_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

LL_INLL_IN

The TRS R consists of the following rules:none


s = LL_IN evaluates to t =LL_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from LL_IN to LL_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
T_IN(N) → U11(N, ll_in(N, Xs))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out
U1(x1, x2)  =  U1(x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
U3(x1, x2)  =  U3(x2)
U4(x1, x2)  =  U4(x2)
T_IN(x1)  =  T_IN(x1)
U11(x1, x2)  =  U11(x2)
U31(x1, x2)  =  U31(x2)
U21(x1, x2)  =  U21(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
T_IN(N) → U11(N, ll_in(N, Xs))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))

The argument filtering Pi contains the following mapping:
0  =  0
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x3)
U6(x1, x2, x3, x4, x5)  =  U6(x5)
T_IN(x1)  =  T_IN(x1)
U11(x1, x2)  =  U11(x2)
U31(x1, x2)  =  U31(x2)
U21(x1, x2)  =  U21(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
T_IN(N) → U11(ll_in)
U11(ll_out(N, Xs)) → U21(select_in(Xs))
U21(select_out(Xs1)) → U31(ll_in)

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U21(select_out(Xs1)) → U31(ll_in) at position [0] we obtained the following new rules:

U21(select_out(y0)) → U31(ll_out(0, []))
U21(select_out(y0)) → U31(U5(ll_in))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
U21(select_out(y0)) → U31(ll_out(0, []))
T_IN(N) → U11(ll_in)
U11(ll_out(N, Xs)) → U21(select_in(Xs))
U21(select_out(y0)) → U31(U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U11(ll_out(N, Xs)) → U21(select_in(Xs)) at position [0] we obtained the following new rules:

U11(ll_out(y0, .(x0))) → U21(U6(select_in(x0)))
U11(ll_out(y0, .(x0))) → U21(select_out(x0))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
U21(select_out(y0)) → U31(ll_out(0, []))
T_IN(N) → U11(ll_in)
U11(ll_out(y0, .(x0))) → U21(select_out(x0))
U11(ll_out(y0, .(x0))) → U21(U6(select_in(x0)))
U21(select_out(y0)) → U31(U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule T_IN(N) → U11(ll_in) at position [0] we obtained the following new rules:

T_IN(y0) → U11(U5(ll_in))
T_IN(y0) → U11(ll_out(0, []))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
U21(select_out(y0)) → U31(ll_out(0, []))
U11(ll_out(y0, .(x0))) → U21(select_out(x0))
T_IN(y0) → U11(U5(ll_in))
U11(ll_out(y0, .(x0))) → U21(U6(select_in(x0)))
T_IN(y0) → U11(ll_out(0, []))
U21(select_out(y0)) → U31(U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
U21(select_out(y0)) → U31(ll_out(0, []))
U11(ll_out(y0, .(x0))) → U21(select_out(x0))
T_IN(y0) → U11(U5(ll_in))
U11(ll_out(y0, .(x0))) → U21(U6(select_in(x0)))
U21(select_out(y0)) → U31(U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U31(ll_out(M, Xs1)) → T_IN(M)
U21(select_out(y0)) → U31(ll_out(0, []))
U11(ll_out(y0, .(x0))) → U21(select_out(x0))
T_IN(y0) → U11(U5(ll_in))
U11(ll_out(y0, .(x0))) → U21(U6(select_in(x0)))
U21(select_out(y0)) → U31(U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(Xs)
select_in(.(Xs)) → U6(select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(select_out(Ys)) → select_out(.(Ys))


s = U11(U5(ll_in)) evaluates to t =U11(U5(ll_in))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U11(U5(ll_in))U11(U5(ll_out(0, [])))
with rule ll_inll_out(0, []) at position [0,0] and matcher [ ]

U11(U5(ll_out(0, [])))U11(ll_out(s(0), .([])))
with rule U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs)) at position [0] and matcher [Xs / [], N / 0]

U11(ll_out(s(0), .([])))U21(select_out([]))
with rule U11(ll_out(y0', .(x0))) → U21(select_out(x0)) at position [] and matcher [y0' / s(0), x0 / []]

U21(select_out([]))U31(ll_out(0, []))
with rule U21(select_out(y0)) → U31(ll_out(0, [])) at position [] and matcher [y0 / []]

U31(ll_out(0, []))T_IN(0)
with rule U31(ll_out(M, Xs1)) → T_IN(M) at position [] and matcher [M / 0, Xs1 / []]

T_IN(0)U11(U5(ll_in))
with rule T_IN(y0) → U11(U5(ll_in))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

T_IN(N) → U11(N, ll_in(N, Xs))
T_IN(N) → LL_IN(N, Xs)
LL_IN(s(N), .(X, Xs)) → U51(N, X, Xs, ll_in(N, Xs))
LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
U11(N, ll_out(N, Xs)) → SELECT_IN(X, Xs, Xs1)
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → U61(X, Y, Xs, Ys, select_in(X, Xs, Ys))
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)
U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U21(N, select_out(X, Xs, Xs1)) → LL_IN(M, Xs1)
U31(N, ll_out(M, Xs1)) → U41(N, t_in(M))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)
LL_IN(x1, x2)  =  LL_IN
T_IN(x1)  =  T_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
U41(x1, x2)  =  U41(x1, x2)
U11(x1, x2)  =  U11(x1, x2)
U31(x1, x2)  =  U31(x1, x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)
U61(x1, x2, x3, x4, x5)  =  U61(x3, x5)
U21(x1, x2)  =  U21(x1, x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

T_IN(N) → U11(N, ll_in(N, Xs))
T_IN(N) → LL_IN(N, Xs)
LL_IN(s(N), .(X, Xs)) → U51(N, X, Xs, ll_in(N, Xs))
LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
U11(N, ll_out(N, Xs)) → SELECT_IN(X, Xs, Xs1)
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → U61(X, Y, Xs, Ys, select_in(X, Xs, Ys))
SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)
U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U21(N, select_out(X, Xs, Xs1)) → LL_IN(M, Xs1)
U31(N, ll_out(M, Xs1)) → U41(N, t_in(M))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)
LL_IN(x1, x2)  =  LL_IN
T_IN(x1)  =  T_IN(x1)
U51(x1, x2, x3, x4)  =  U51(x4)
U41(x1, x2)  =  U41(x1, x2)
U11(x1, x2)  =  U11(x1, x2)
U31(x1, x2)  =  U31(x1, x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)
U61(x1, x2, x3, x4, x5)  =  U61(x3, x5)
U21(x1, x2)  =  U21(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SELECT_IN(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN(X, Xs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
SELECT_IN(x1, x2, x3)  =  SELECT_IN(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SELECT_IN(.(Xs)) → SELECT_IN(Xs)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)
LL_IN(x1, x2)  =  LL_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LL_IN(s(N), .(X, Xs)) → LL_IN(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN(x1, x2)  =  LL_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LL_INLL_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

LL_INLL_IN

The TRS R consists of the following rules:none


s = LL_IN evaluates to t =LL_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from LL_IN to LL_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
T_IN(N) → U11(N, ll_in(N, Xs))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

t_in(0) → t_out(0)
t_in(N) → U1(N, ll_in(N, Xs))
ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U1(N, ll_out(N, Xs)) → U2(N, select_in(X, Xs, Xs1))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))
U2(N, select_out(X, Xs, Xs1)) → U3(N, ll_in(M, Xs1))
U3(N, ll_out(M, Xs1)) → U4(N, t_in(M))
U4(N, t_out(M)) → t_out(N)

The argument filtering Pi contains the following mapping:
t_in(x1)  =  t_in(x1)
0  =  0
t_out(x1)  =  t_out(x1)
U1(x1, x2)  =  U1(x1, x2)
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
U2(x1, x2)  =  U2(x1, x2)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
U3(x1, x2)  =  U3(x1, x2)
U4(x1, x2)  =  U4(x1, x2)
T_IN(x1)  =  T_IN(x1)
U11(x1, x2)  =  U11(x1, x2)
U31(x1, x2)  =  U31(x1, x2)
U21(x1, x2)  =  U21(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U21(N, select_out(X, Xs, Xs1)) → U31(N, ll_in(M, Xs1))
U11(N, ll_out(N, Xs)) → U21(N, select_in(X, Xs, Xs1))
T_IN(N) → U11(N, ll_in(N, Xs))
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

ll_in(0, []) → ll_out(0, [])
ll_in(s(N), .(X, Xs)) → U5(N, X, Xs, ll_in(N, Xs))
select_in(X, .(X, Xs), Xs) → select_out(X, .(X, Xs), Xs)
select_in(X, .(Y, Xs), .(Y, Ys)) → U6(X, Y, Xs, Ys, select_in(X, Xs, Ys))
U5(N, X, Xs, ll_out(N, Xs)) → ll_out(s(N), .(X, Xs))
U6(X, Y, Xs, Ys, select_out(X, Xs, Ys)) → select_out(X, .(Y, Xs), .(Y, Ys))

The argument filtering Pi contains the following mapping:
0  =  0
ll_in(x1, x2)  =  ll_in
[]  =  []
ll_out(x1, x2)  =  ll_out(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
U5(x1, x2, x3, x4)  =  U5(x4)
select_in(x1, x2, x3)  =  select_in(x2)
select_out(x1, x2, x3)  =  select_out(x2, x3)
U6(x1, x2, x3, x4, x5)  =  U6(x3, x5)
T_IN(x1)  =  T_IN(x1)
U11(x1, x2)  =  U11(x1, x2)
U31(x1, x2)  =  U31(x1, x2)
U21(x1, x2)  =  U21(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U21(N, select_out(Xs, Xs1)) → U31(N, ll_in)
U11(N, ll_out(N, Xs)) → U21(N, select_in(Xs))
U31(N, ll_out(M, Xs1)) → T_IN(M)
T_IN(N) → U11(N, ll_in)

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(.(Xs), Xs)
select_in(.(Xs)) → U6(Xs, select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(Xs, select_out(Xs, Ys)) → select_out(.(Xs), .(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0, x1)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U21(N, select_out(Xs, Xs1)) → U31(N, ll_in) at position [1] we obtained the following new rules:

U21(y0, select_out(y1, y2)) → U31(y0, ll_out(0, []))
U21(y0, select_out(y1, y2)) → U31(y0, U5(ll_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U21(y0, select_out(y1, y2)) → U31(y0, ll_out(0, []))
U21(y0, select_out(y1, y2)) → U31(y0, U5(ll_in))
U11(N, ll_out(N, Xs)) → U21(N, select_in(Xs))
T_IN(N) → U11(N, ll_in)
U31(N, ll_out(M, Xs1)) → T_IN(M)

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(.(Xs), Xs)
select_in(.(Xs)) → U6(Xs, select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(Xs, select_out(Xs, Ys)) → select_out(.(Xs), .(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0, x1)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U11(N, ll_out(N, Xs)) → U21(N, select_in(Xs)) at position [1] we obtained the following new rules:

U11(y0, ll_out(y0, .(x0))) → U21(y0, U6(x0, select_in(x0)))
U11(y0, ll_out(y0, .(x0))) → U21(y0, select_out(.(x0), x0))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U21(y0, select_out(y1, y2)) → U31(y0, ll_out(0, []))
U21(y0, select_out(y1, y2)) → U31(y0, U5(ll_in))
U11(y0, ll_out(y0, .(x0))) → U21(y0, select_out(.(x0), x0))
U11(y0, ll_out(y0, .(x0))) → U21(y0, U6(x0, select_in(x0)))
U31(N, ll_out(M, Xs1)) → T_IN(M)
T_IN(N) → U11(N, ll_in)

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(.(Xs), Xs)
select_in(.(Xs)) → U6(Xs, select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(Xs, select_out(Xs, Ys)) → select_out(.(Xs), .(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0, x1)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule T_IN(N) → U11(N, ll_in) at position [1] we obtained the following new rules:

T_IN(y0) → U11(y0, ll_out(0, []))
T_IN(y0) → U11(y0, U5(ll_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U21(y0, select_out(y1, y2)) → U31(y0, ll_out(0, []))
U21(y0, select_out(y1, y2)) → U31(y0, U5(ll_in))
U11(y0, ll_out(y0, .(x0))) → U21(y0, select_out(.(x0), x0))
U11(y0, ll_out(y0, .(x0))) → U21(y0, U6(x0, select_in(x0)))
T_IN(y0) → U11(y0, ll_out(0, []))
U31(N, ll_out(M, Xs1)) → T_IN(M)
T_IN(y0) → U11(y0, U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(.(Xs), Xs)
select_in(.(Xs)) → U6(Xs, select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(Xs, select_out(Xs, Ys)) → select_out(.(Xs), .(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP

Q DP problem:
The TRS P consists of the following rules:

U21(y0, select_out(y1, y2)) → U31(y0, ll_out(0, []))
U21(y0, select_out(y1, y2)) → U31(y0, U5(ll_in))
U11(y0, ll_out(y0, .(x0))) → U21(y0, select_out(.(x0), x0))
U11(y0, ll_out(y0, .(x0))) → U21(y0, U6(x0, select_in(x0)))
U31(N, ll_out(M, Xs1)) → T_IN(M)
T_IN(y0) → U11(y0, U5(ll_in))

The TRS R consists of the following rules:

ll_inll_out(0, [])
ll_inU5(ll_in)
select_in(.(Xs)) → select_out(.(Xs), Xs)
select_in(.(Xs)) → U6(Xs, select_in(Xs))
U5(ll_out(N, Xs)) → ll_out(s(N), .(Xs))
U6(Xs, select_out(Xs, Ys)) → select_out(.(Xs), .(Ys))

The set Q consists of the following terms:

ll_in
select_in(x0)
U5(x0)
U6(x0, x1)

We have to consider all (P,Q,R)-chains.